﻿@inject ILanguageService languageService
@inject IWorkContext workContext
@{
    //page title
    string adminPageTitle = !string.IsNullOrWhiteSpace(ViewBag.PageTitle) ? ViewBag.PageTitle : "AdminArea - PMSWeb";
    string bodyHtmlClass = !string.IsNullOrWhiteSpace(ViewBag.BodyHtmlClass) ? ViewBag.BodyHtmlClass : ""; 
}
<!DOCTYPE html>
<html lang="@languageService.GetTwoLetterIsoLanguageName(workContext.WorkingLanguage)">
<head>
    <meta charset="utf-8">
    <title>@adminPageTitle</title>
    <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="format-detection" content="telephone=no">
    <script>
        var rootAppPath = '@(Url.Content("~/"))';
    </script>

    <environment names="Development">
        <link rel="stylesheet" href="~/lib/PearAdminLayui/component/pear/css/pear.css" media="all" asp-append-version="true" />
        <link rel="stylesheet" href="~/src/css/backend/site.css" media="all" asp-append-version="true" />
    </environment>
    <environment names="Staging,Production">
        <link rel="stylesheet" href="~/lib/PearAdminLayui/component/pear/css/pear.css" media="all" asp-append-version="true" />
        <link rel="stylesheet" href="~/dist/css/backend/site.min.css" media="all" asp-append-version="true" />
    </environment>
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    @await RenderSectionAsync("CssLinks", required: false).ConfigureAwait(false)
    @await RenderSectionAsync("CssStyles", required: false).ConfigureAwait(false)
</head>
<body class="@bodyHtmlClass">
    @RenderBody()

    <environment names="Development">
        <script src="~/src/js/utils/PMSUtils.js" asp-append-version="true"></script>
        <script src="~/lib/PearAdminLayui/component/layui/layui.js" asp-append-version="true"></script>
        <script src="~/lib/PearAdminLayui/component/pear/pear.js" asp-append-version="true"></script>
        <script src="~/src/js/utils/backendapiconfig.js" asp-append-version="true"></script>
    </environment>
    <environment names="Staging,Production">
        <script src="~/dist/js/utils/PMSUtils.min.js" asp-append-version="true"></script>
        <script src="~/lib/PearAdminLayui/component/layui/layui.js" asp-append-version="true"></script>
        <script src="~/lib/PearAdminLayui/component/pear/pear.js" asp-append-version="true"></script>
        <script src="~/dist/js/utils/backendapiconfig.min.js" asp-append-version="true"></script>
    </environment>
    @await RenderSectionAsync("Scripts", required: false).ConfigureAwait(false)
</body>
</html>
